import { createRouter, createWebHistory } from 'vue-router'

const Layout = () => import('@/views/layout/index.vue')
const Map = () => import('@/views/useMap/index.vue')
const WebSocket = () => import('@/views/webSocketClient/index.vue')

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: 'laout',
      component: Layout,
      redirect: '/map',
      children:[
        {
          path: '/map',
          name: 'map',
          component: Map,
        },
        {
          path: '/webSocket',
          name: 'webSocket',
          component: WebSocket,
        },
      ]
    },
  ],
})

export default router
